package com.wzxy.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wzxy.dao.IStudentDao;
import com.wzxy.model.Student;
import com.wzxy.service.IStudentService;

@Transactional
@Service("studentService")
public class StudentServiceImpl implements IStudentService{
	
	@Resource
	IStudentDao studentDao;
	
	@Override
	public List<Student> queryAllStudents() {
		return studentDao.queryAllStudents();
	}

	@Override
	public Student queryStudentById(String sid) {
		return studentDao.queryStudentById(sid);
	}

	@Override
	public void addStudent(Student s) {
		studentDao.addStudent(s);
	}

	@Override
	public boolean updateStudent(Student s) {
		return studentDao.updateStudent(s);
	}

	@Override
	public boolean deleteStudent(String sid) {
		return studentDao.deleteStudent(sid);
	}

}
